import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/Home/Home.vue'



Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path:'/',
      name:'home',
      component:Home
    },
    {
      path:'/login',
      name:'login',
      component:() => import('../pages/Login/Login.vue'),
    },
    {
      path:'/search',
      name:'search',
      component:()=>import('../pages/Search/Search.vue'),
      // meta:{
      //   //需要登录
      //   isLogin:true
      // }
    },
    {
      path:'/details',
      name:'details',
      component:()=>import('../pages/Details/Details.vue'),
    },
    {
      path:'/shopcar',
      name:'shopcar',
      component:()=>import('../pages/ShopCar/ShopCar.vue')
    }
  ]
})
